package com.zmp.kotlinnote.test;

import org.junit.Test;

/**
 * Created by zmp on 2019/2/20 18:08
 *
 * @author zmp
 */
public class AAA {
    @Test
    public void test() {

        String regular = "^[你我]?(不[说聊]|退出声控|再见|拜拜|去休息|闭嘴|滚[开蛋]?|去帮别人|不用你?帮[助忙]?)[了啦吧啊]?$";
        String text = "闭嘴";
        System.out.println(text + ":" + text.matches(regular));

        text = "你";
        System.out.println(text + ":" + text.matches(regular));

        text = "你闭嘴";
        System.out.println(text + ":" + text.matches(regular));

        text = "不用";
        System.out.println(text + ":" + text.matches(regular));

        text = "不用帮";
        System.out.println(text + ":" + text.matches(regular));

        text = "不用你帮";
        System.out.println(text + ":" + text.matches(regular));
        text = "不用你帮助";
        System.out.println(text + ":" + text.matches(regular));

        text = "我不用你帮助";
        System.out.println(text + ":" + text.matches(regular));

        text = "我不用你帮助了";
        System.out.println(text + ":" + text.matches(regular));

        text = "滚蛋吧";
        System.out.println(text + ":" + text.matches(regular));

        text = "去帮别人";
        System.out.println(text + ":" + text.matches(regular));

        text = " 帮别人";
        System.out.println(text + ":" + text.matches(regular));
    }
}
